<?php
/**
 * Win32 클래스 
 *
 * @package php.ui.winbinder.win32
 */

/**
 * KERNEL 클래스 구현중 
 *
 * @package php.ui.winbinder.win32
 */
class WBKernel extends WBLibrary { 

	public function __construct()  { 
		parent::__construct('KERNEL');
	}

	/**
	 * 전역 메모리 상태 
	 *
	 */ 
	public function GlobalMemoryStatus() { 
		$MEMORYSTATUS_RAW =  "VVVVVVVV";
		$MEMORYSTATUS_SIZE =  4 * 8;
		$MEMORYSTATUS =  "Vlen/Vmemload/Vphys/Vavailphys/Vpagefile/Vavailpagefile/Vvirtual/Vavailvirtual";

		$data = pack($MEMORYSTATUS_RAW, $MEMORYSTATUS_SIZE, 0, 0, 0, 0, 0, 0, 0);

		$this->call('GlobalMemoryStatus', array($data));

		return unpack($MEMORYSTATUS, $data);
	}

	/**
	 * ANSI Code Page 
	 *
	 */
	public function GetACP() { 
		return $this->call('GetACP');
	}

	/**
	 *
	 *
	 */
	public function GlobalAlloc($size) { 
		$this->call('GlobalAlloc', array($size));
	}

	public function GetTickCount() { 
		return $this->call('GetTickCount');
	}

	public function GetOEMCP() { 
		return $this->call('GetOEMCP');
	}

	public function GetSystemMetrics($what) { 
		return $this->call('GetSystemMetrics', array($what));
	}
}


?>